package com.cloudkinto.service.company.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class LogisticsProductListResponse {
    private boolean success = false;

    private Integer errorCode;

    private String errorMsg;

    private Result result;


    public LogisticsProductListResponse() {
    }

    public LogisticsProductListResponse(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    @Data
    public static class Result {
        @ApiModelProperty(value = "Map 的 key 为 cwWarehouseCode，value为 LIST<LogisticsProductInfo>", required = true)
        Map<String, List<LogisticsProductInfo>> logisticsProductMap;


        public Result() {
        }

        public Result(Map<String, List<LogisticsProductInfo>> logisticsProductMap) {
            this.logisticsProductMap = logisticsProductMap;
        }
    }

    @Data
    public static class LogisticsProductInfo {
        @ApiModelProperty(value = "物流产品编码", required = true)
        private String logisticsProductCode;
        @ApiModelProperty(value = "物流产品名称", required = true)
        private String logisticsProductName;
        @ApiModelProperty(value = "是否支持跨国配送", required = true)
        private boolean crossCountry = false;


        public LogisticsProductInfo() {
        }

        public LogisticsProductInfo(String logisticsProductCode, String logisticsProductName) {
            this.logisticsProductCode = logisticsProductCode;
            this.logisticsProductName = logisticsProductName;
        }
    }
}
